<?php
//encryption key for parameters to be passed between $_GET for applications
$s_encryptionKey = "\xc8\xd9\xb9\x06\xd9\xe8\xc9\xd2";
//application routing specifics
$s_appRequestVarName = 'appRequest';
$s_subAppRequestVarName = 'action';
//root class where the views and navigation will be
$s_rootFile = 'index.php';
//array of application details
/*
 * structure:
 * $arr_applications = array(
 * 			array(	
 * 				'app_ident'=> '',
 * 				'app_display_name'=> '',
 * 				'controller_class'=> '',
 * 				'action'=> 'doLogOut',
				'action_alias'=> 'doLogOutAlias',
 * 				'controller_class_alias'=> '',
 * 				'css_style_sheets'=> array(),
 * 				'js_files'=> array(),
 *				'js_load_function'=> 'function();',
 *				'hidden'=> true
 * 			)
 * 		)
 * )
 * 
 * 
 * note:
 * for sub applications use the same array structure but 
 * just sub the controller_class attribute with the method name
 * and sub the controller_class_alias with anything once again
 */
$arr_fw_js_files = array(
	C_FW_frontendPackage. 'js/lib/jquery/jquery-1.7.js',
	C_FW_frontendPackage. 'js/lib/jquery/jquery-ui-1.8.19.custom.min.js',
	C_FW_frontendPackage. 'js/lib/jquery/jquery.cookie.js',
	C_FW_frontendPackage. 'js/lib/tinymce/jscripts/tiny_mce/tiny_mce.js',
	C_FW_frontendPackage. 'js/lib/tinymce/jscripts/tiny_mce/jquery.tinymce.js',
	C_FW_frontendPackage. 'js/lib/jquery/datatable/jquery.dataTables.min.js',
	C_FW_frontendPackage. 'js/fw/application/static-vars.js'
);

$arr_fw_css_files = array(
	C_FW_frontendPackage. 'design/style.css',
	C_FW_frontendPackage. 'design/css/smoothness/jquery-ui-1.8.16.custom.css',
	C_FW_frontendPackage. 'design/utilities/utilities-style.css'
);

//public css files
$arr_fw_pub_css_files = array(
	C_FW_frontendPackage . 'design/IM_style.css',
	C_FW_frontendPackage. 'design/css/ui-darkness/jquery-ui-1.8.16.custom.css',
);

//public js files
$arr_fw_pub_js_files = array(
	C_FW_frontendPackage. 'js/lib/jquery/jquery-1.7.js',
	C_FW_frontendPackage. 'js/lib/jquery/jquery-ui-1.8.19.custom.min.js',
	C_FW_frontendPackage. 'js/fw/application/static-vars.js'
);

$arr_applications = array(
	//user applications
	array(
		'app_ident'=> 'IM_Home',
		'app_display_name'=> 'home',
		'controller_class'=> 'IM_C_Pub_Home',
		'controller_class_alias'=> 'Home',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> false
	),
	
	array(
		'app_ident'=> 'Pub_advertise',
		'app_display_name'=> 'advertise',
		'controller_class'=> 'IM_C_Advertise',
		'controller_class_alias'=> 'poweredBy',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'IM_ModelsMain',
		'app_display_name'=> 'models',
		'controller_class'=> 'IM_C_Pub_Models',
		'controller_class_alias'=> 'Models',
		'css_style_sheets'=> fw_util_arrayPush($arr_fw_pub_css_files,
			array(
				C_FW_frontendPackage . 'design/ContentFlow/ContentFlowAddOn_fancyScrollbar.css',
				C_FW_frontendPackage . 'design/ContentFlow/contentflow.css'
			)
		),
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, array(
			C_FW_frontendPackage . 'design/ContentFlow/contentflow.js',
			C_FW_frontendPackage . 'design/ContentFlow/ContentFlowAddOn_roundabout.js',
			C_FW_frontendPackage . 'design/ContentFlow/ContentFlowAddOn_fancyScrollbar.js',
			C_FW_frontendPackage . 'js/lib/jquery/scrollpane.js',
			C_FW_frontendPackage . 'js/custom/custom-objects/models-object.js',
			C_FW_frontendPackage . 'js/custom/custom-applications/models-application.js'
		)),
		'hidden'=> false
	),
	/*
	array(
		'app_ident'=> 'IM_Model_Coverflow',
		'app_display_name'=> 'CoverFlow',
		'controller_class'=> 'IM_C_Pub_Home',
		'controller_class_alias'=> 'CoverFlow',
		'action'=> 'showModelCoverFlow',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> true
	),
	*/
	/*
	array(
		'app_ident'=> 'IM_Portfolio',
		'app_display_name'=> 'portfolio',
		'controller_class'=> 'IM_C_Pub_Portfolio',
		'controller_class_alias'=> 'Portfolio',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> false
	),
	*/
	array(
		'app_ident'=> 'IM_Tweets',
		'app_display_name'=> 'buzz',
		'controller_class'=> 'IM_C_Pub_Buzz',
		'controller_class_alias'=> 'Buzz',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, 
			array(
				'//platform.twitter.com/widgets.js',
				C_FW_frontendPackage . 'js/custom/custom-applications/buzz-application.js'
			)
		),
		'hidden'=> false
	),
	
	array(
		'app_ident'=> 'IM_Buzz',
		'app_display_name'=> 'blog',
		'controller_class'=> 'IM_C_Pub_Home',
		'controller_class_alias'=> 'Home',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> false,
	
		'ext'=> true,
		'link'=> 'http://imagencyph.blogspot.com/',
		'asNewTab'=> true
	),
	
	array(
		'app_ident'=> 'IM_About',
		'app_display_name'=> 'about',
		'controller_class'=> 'IM_C_Pub_About',
		'controller_class_alias'=> 'About',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> $arr_fw_pub_js_files,
		'hidden'=> false
	),
	
	array(
		'app_ident'=> 'IM_ContactUs',
		'app_display_name'=> 'contact',
		'controller_class'=> 'IM_C_Pub_Contact',
		'controller_class_alias'=> 'ContactUs',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/contactUs-application.js'
			)
		),
		'hidden'=> false
	),
	
	array(
		'app_ident'=> 'IM_ContactUsMessageYesNo',
		'app_display_name'=> 'contact',
		'controller_class'=> 'IM_C_Pub_Contact',
		'controller_class_alias'=> 'ContactUsStatusSent',
		'action'=> 'messageSendStatus',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/contactUs-application.js'
			)
		),
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'BeDiscovered',
		'app_display_name'=> 'be discovered',
		'controller_class'=> 'IM_C_Pub_Contact',
		'action'=> 'beDiscoveredStart',
		'controller_class_alias'=> 'BeDiscovered',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, 
			array(
				C_FW_frontendPackage . 'js/lib/jqueryFileUpload/js/jquery.iframe-transport.js',
			 	C_FW_frontendPackage . 'js/lib/jqueryFileUpload/js/jquery.fileupload.js',
				C_FW_frontendPackage . 'js/custom/custom-applications/discover-application.js'
			)
		),
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'BeDiscoveredContactYesNo',
		'app_display_name'=> 'be discovered',
		'controller_class'=> 'IM_C_Pub_Contact',
		'action'=> 'beDiscoveredStatusSent',
		'controller_class_alias'=> 'BeDiscoveredYesNo',
		'css_style_sheets'=> $arr_fw_pub_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_pub_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/contactUs-application.js'
			)
		),
		'hidden'=> true
	),
	
	//admin applications
	array(
		'app_ident'=> 'AdminUpdateHomeSlideShow',
		'app_display_name'=> 'update home slideshow',
		'controller_class'=> 'IM_C_ManageHome',
		'controller_class_alias'=> 'AdminManageHome',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> $arr_fw_js_files,
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'manageModels',
		'app_display_name'=> 'manage models',
		'controller_class'=> 'IM_C_ManageModels',
		'controller_class_alias'=> 'AdminShowModelsShow',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModels-application.js'
			)
		),
		'hidden'=> true
	),
	// admin applications - manage models
	array(
		'app_ident'=> 'AdminAddModel',
		'app_display_name'=> 'Add Model',
		'controller_class'=> 'IM_C_ManageModels',
		'controller_class_alias'=> 'AdminAddModelShow',
		'action'=> 'addModel',
		'action_alias'=> 'AdminAddModelShowAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js',
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModels-application.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	//admin applications - update model
	array(
		'app_ident'=> 'AdminUpdateModel',
		'app_display_name'=> 'Add Model',
		'controller_class'=> 'IM_C_ManageModels',
		'controller_class_alias'=> 'AdminUpdateModelShow',
		'action'=> 'updateModel',
		'action_alias'=> 'AdminUpdateModelShowAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js',
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModels-application.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	//admin applications - update model
	array(
		'app_ident'=> 'AdminDeleteModel',
		'app_display_name'=> 'Delete Model',
		'controller_class'=> 'IM_C_ManageModels',
		'controller_class_alias'=> 'AdminDeleteModelShow',
		'action'=> 'deleteModel',
		'action_alias'=> 'AdminDeleteModelShowAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js',
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModels-application.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AdminShowModels',
		'app_display_name'=> 'View Models',
		'controller_class'=> 'IM_C_ManageModels',
		'controller_class_alias'=> 'AdminShowModelsShow',
		'action'=> 'showModels',
		'action_alias'=> 'AdminShowModelsShowAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModels-application.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	//admin - manage pictures
	array(
		'app_ident'=> 'AdminManageModelPictures',
		'app_display_name'=> 'View Models',
		'controller_class'=> 'IM_C_ManageModelPictures',
		'controller_class_alias'=> 'AdminShowModelPictures',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> $arr_fw_js_files,
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	//admin - manage cover photo
	array(
		'app_ident'=> 'AdminManageModelCoverPicture',
		'app_display_name'=> 'Change cover picture',
		'controller_class'=> 'IM_C_ManageModelPictures',
		'controller_class_alias'=> 'AdminManageModelCoverPictureAlias',
		'action'=> 'manageCoverPhoto',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/custom/custom-applications/ManageModPic.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	
	//user applications
	array(
		'app_ident'=> 'AdminManageUsers',
		'app_display_name'=> 'ManageUsers',
		'controller_class'=> 'IM_C_ManageUsers',
		'controller_class_alias'=> 'AdminManageUsersAlias',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> $arr_fw_js_files,
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AdminAddUser',
		'app_display_name'=> 'ManageUsers',
		'controller_class'=> 'IM_C_ManageUsers',
		'controller_class_alias'=> 'AdminAddUserAlias',
		'action'=> 'addUser',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AdminDeleteUser',
		'app_display_name'=> 'ManageUsers',
		'controller_class'=> 'IM_C_ManageUsers',
		'controller_class_alias'=> 'AdminDeleteUserAlias',
		'action'=> 'removeUser',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> $arr_fw_js_files,
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AdminDoLogin',
		'app_display_name'=> 'Login',
		'controller_class'=> 'LoginController',
		'controller_class_alias'=> 'IMAdminLogin',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	
	array(
		'app_ident'=> 'AdminDoLogout',
		'app_display_name'=> 'Logout',
		'controller_class'=> 'LoginController',
		'controller_class_alias'=> 'IMAdminLogout',
		'action'=> 'doLogOut',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, 
			array(
				C_FW_frontendPackage . 'js/fw/utilities/FormStyler.js'
			)
		),
		'js_load_function'=> '',
		'hidden'=> true
	),
	/*
	array(
		'app_ident'=> 'Calendar',
		'app_display_name'=> 'Calendar',
		'controller_class'=> 'CalendarController',
		'controller_class_alias'=> 'CalendarAlias',
		'css_style_sheets'=> fw_util_arrayPush($arr_fw_css_files, array(
				C_FW_frontendPackage . 'js/lib/jquery/fullcalendar-1.5.2/fullcalendar/fullcalendar.css',
			)
		),
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, array(
				C_FW_frontendPackage.'js/lib/jquery/fullcalendar-1.5.2/fullcalendar/fullcalendar.min.js', 
				C_FW_frontendPackage.'js/custom/custom-applications/Calendar-application.js'
			)
		),
		'js_load_function'=> 'startApp();',
		'hidden'=> false
	),
	
	// finance layer
	array(
		'app_ident'=> 'Finance',
		'app_display_name'=> 'Finance Management',
		'controller_class'=> 'FinanceController',
		'controller_class_alias'=> 'FinanceManagement',
		'css_style_sheets'=> $arr_fw_css_files,
		'js_files'=> fw_util_arrayPush($arr_fw_js_files, array(
			C_FW_frontendPackage.'js/custom/custom-objects/finance-objects.js',
			C_FW_frontendPackage.'js/custom/custom-applications/finance-application.js'
		)),
		'js_load_function'=> 'loadAppFiles();',
		'hidden'=> false
	)
	*/
);

